PDO thinks integers are strings
November 23, 2009 · 90 views · 0 comments
Nearby In Time
Online!
November 22, 2009
Inventory Loss
November 22, 2009
Discovering MySQL Bugs
November 23, 2009
Lightweight Vendors
November 23, 2009
PDO thinks integers are strings
November 23, 2009
Pagination Workaround
November 23, 2009
Web Interface via jQuery
November 24, 2009
jQuery with Flexigrid
November 24, 2009
unmagic quotes
November 25, 2009
About
I seem to be finding bugs left and right. I am using PDO to prevent against SQL injection attacks. It takes all parameters that I pass in, and makes certain that the correct SQL statement is created to run against an MySQL database. The latest bug that I ran into is PHP Bug #40740. It is converting integers to strings, and breaking on paging results using the "limit" keyword. Unfortunately, the bug is over 2.5 years old and looks as though it will never be fixed, but plenty of people are complaining about it. I'll have to find a work-around. From Dedric Mauriac via bloghud.com